package com.resifind.www.exception;

import com.resifind.www.constant.ErrorCode;

/**
 * @author 36069
 */
public class ClientException extends BaseException{
    public ClientException(ErrorCode errorCode) {
        super(errorCode);
    }

    public static ClientException realNameError(){
        return new ClientException(ErrorCode.CLIENT_REAL_NAME_ERROR);
    }

    public static ClientException rechargeAmountError(){
        return new ClientException(ErrorCode.CLIENT_RECHARGE_AMOUNT_ERROR);
    }

    public static ClientException balanceNotEnough(){
        return new ClientException(ErrorCode.CLIENT_BALANCE_NOT_ENOUGH);
    }

    public static ClientException alreadySignedIn(){
        return new ClientException(ErrorCode.CLIENT_ALREADY_SIGNED_IN);
    }

    public static ClientException avatarFileFormatError(){
        return new ClientException(ErrorCode.CLIENT_AVATAR_FILE_FORMAT_ERROR);
    }

    public static ClientException avatarUploadError(){
        return new ClientException(ErrorCode.CLIENT_AVATAR_FILE_UPLOAD_ERROR);
    }

    public static ClientException avatarFileDeleteError(){
        return new ClientException(ErrorCode.CLIENT_AVATAR_FILE_DELETE_ERROR);
    }

    public static ClientException viewNotClient(){
        return new ClientException(ErrorCode.CLIENT_VIEW_NOT_CLIENT);
    }
}
